﻿using NUnit.Framework;

namespace NJabber.Stream.Elements
{
    [TestFixture]
    public class IqStanzaTest : StanzaTestBase
    {
        public IqStanzaTest() : base("iq", "", "")
        { }

        [Test]
        public void AddQueryElement_EmptyContent_AddIqQueryElement()
        {
            IqStanza stanza = new IqStanza();

            IqQueryElement query = stanza.AddQueryElement("some-namespace");

            Assert.That(stanza.Content.Contains(query), Is.True);
            Assert.That(query, Is.Not.Null);
            Assert.That(query.ContentNamespace.Uri, Is.EqualTo("some-namespace"));
        }
    }
}
